package org.gao.test.transaction.web.sample.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import org.gao.test.transaction.web.sample.ConnectionHolder;

public class CustomerDAO {

	public void insert() {
		
		Connection conn = ConnectionHolder.getConn();
		
		String sql = "insert into tbl_course_category values ('abcde')";
		
		Statement state = null;
		try {
			state = conn.createStatement();
			state.execute(sql);
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				state.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}
	
	public void insert1() {
		
		Connection conn = ConnectionHolder.getConn();
		
		String sql = "insert into tbl_course_category values ('abcde')";
		
		Statement state = null;
		try {
			state = conn.createStatement();
			state.execute(sql);
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				state.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		
	}
}
